using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._General
{
    /// <summary>
    /// <para>Export Report To PDF</para>
    /// <para>Exports an ArcGIS Pro report to a PDF file.</para>
    /// <para>将 ArcGIS Pro 报告导出为 PDF 文件。</para>
    /// </summary>    
    [DisplayName("Export Report To PDF")]
    public class ExportReportToPDF : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExportReportToPDF()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_report">
        /// <para>Input Report</para>
        /// <para>The input report or .rptx file.</para>
        /// <para>输入报告或 .rptx 文件。</para>
        /// </param>
        /// <param name="_out_pdf_file">
        /// <para>PDF File</para>
        /// <para>The output PDF file.</para>
        /// <para>输出 PDF 文件。</para>
        /// </param>
        public ExportReportToPDF(object _in_report, object _out_pdf_file)
        {
            this._in_report = _in_report;
            this._out_pdf_file = _out_pdf_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Export Report To PDF";

        public override string CallName => "management.ExportReportToPDF";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_report, _out_pdf_file, _expression, _resolution, _image_quality.GetGPValue(), _embed_font.GetGPValue(), _compress_vector_graphics.GetGPValue(), _image_compression.GetGPValue(), _password_protect.GetGPValue(), _pdf_password, _page_range_type.GetGPValue(), _custom_page_range, _initial_page_number, _final_page_number];

        /// <summary>
        /// <para>Input Report</para>
        /// <para>The input report or .rptx file.</para>
        /// <para>输入报告或 .rptx 文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Report")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_report { get; set; }


        /// <summary>
        /// <para>PDF File</para>
        /// <para>The output PDF file.</para>
        /// <para>输出 PDF 文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("PDF File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_pdf_file { get; set; }


        /// <summary>
        /// <para>Expression</para>
        /// <para>An SQL expression used to select a subset of records. This expression is applied in addition to any existing expressions.</para>
        /// <para>用于选择记录子集的 SQL 表达式。除了任何现有表达式之外，还应用此表达式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _expression { get; set; } = null;


        /// <summary>
        /// <para>Resolution (DPI)</para>
        /// <para>The resolution of the exported PDF in dots per inch (dpi).</para>
        /// <para>导出的 PDF 的分辨率，以每英寸点数 （dpi） 为单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Resolution (DPI)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _resolution { get; set; } = 96;


        /// <summary>
        /// <para>Image Quality</para>
        /// <para><xdoc>
        ///   <para>Specifies the output image quality of the PDF. The image quality option controls the quality of rasterized data going into the export.</para>
        ///   <bulletList>
        ///     <bullet_item>Best—The highest available image quality. This is the default.</bullet_item><para/>
        ///     <bullet_item>Better—High image quality.</bullet_item><para/>
        ///     <bullet_item>Normal—A compromise between image quality and speed.</bullet_item><para/>
        ///     <bullet_item>Faster—Lower image quality to generate the report faster.</bullet_item><para/>
        ///     <bullet_item>Fastest—The lowest image quality to create the report the fastest.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定 PDF 的输出图像质量。图像质量选项控制进入导出的栅格化数据的质量。</para>
        ///   <bulletList>
        ///     <bullet_item>最佳 - 最高可用图像质量。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>更好 - 高图像质量。</bullet_item><para/>
        ///     <bullet_item>正常 - 图像质量和速度之间的折衷。</bullet_item><para/>
        ///     <bullet_item>更快 - 降低图像质量以更快地生成报告。</bullet_item><para/>
        ///     <bullet_item>最快 - 以最低的图像质量创建报告的最快速度。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Image Quality")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _image_quality_value _image_quality { get; set; } = _image_quality_value._BEST;

        public enum _image_quality_value
        {
            /// <summary>
            /// <para>Best</para>
            /// <para>Best—The highest available image quality. This is the default.</para>
            /// <para>最佳 - 最高可用图像质量。这是默认设置。</para>
            /// </summary>
            [Description("Best")]
            [GPEnumValue("BEST")]
            _BEST,

            /// <summary>
            /// <para>Better</para>
            /// <para>Better—High image quality.</para>
            /// <para>更好 - 高图像质量。</para>
            /// </summary>
            [Description("Better")]
            [GPEnumValue("BETTER")]
            _BETTER,

            /// <summary>
            /// <para>Normal</para>
            /// <para>Normal—A compromise between image quality and speed.</para>
            /// <para>正常 - 图像质量和速度之间的折衷。</para>
            /// </summary>
            [Description("Normal")]
            [GPEnumValue("NORMAL")]
            _NORMAL,

            /// <summary>
            /// <para>Faster</para>
            /// <para>Faster—Lower image quality to generate the report faster.</para>
            /// <para>更快 - 降低图像质量以更快地生成报告。</para>
            /// </summary>
            [Description("Faster")]
            [GPEnumValue("FASTER")]
            _FASTER,

            /// <summary>
            /// <para>Fastest</para>
            /// <para>Fastest—The lowest image quality to create the report the fastest.</para>
            /// <para>最快 - 以最低的图像质量创建报告的最快速度。</para>
            /// </summary>
            [Description("Fastest")]
            [GPEnumValue("FASTEST")]
            _FASTEST,

        }

        /// <summary>
        /// <para>Embed Fonts</para>
        /// <para><xdoc>
        ///   <para>Specifies whether fonts are embedded in the output report. Font embedding allows text and markers built from font glyphs to be displayed correctly when the PDF is viewed on a computer that does not have the necessary fonts installed.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Fonts will be embedded in the output report. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Fonts will not be embedded in the output report.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否在输出报表中嵌入字体。字体嵌入允许在未安装必要字体的计算机上查看 PDF 时正确显示由字体字形构建的文本和标记。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 字体将嵌入到输出报告中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 字体不会嵌入到输出报告中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Embed Fonts")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _embed_font_value _embed_font { get; set; } = _embed_font_value._true;

        public enum _embed_font_value
        {
            /// <summary>
            /// <para>EMBED_FONTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EMBED_FONTS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_EMBED_FONTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_EMBED_FONTS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Compress Vector Graphics</para>
        /// <para><xdoc>
        ///   <para>Specifies whether to compress the vector content streams in the PDF.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Checked—Vector graphics will be compressed. This option should be set unless clear text is desired for troubleshooting. This is the default.</bullet_item><para/>
        ///       <bullet_item>Unchecked—Vector graphics will not be compressed.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否压缩 PDF 中的矢量内容流。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>选中 - 矢量图形将被压缩。除非需要明文进行故障排除，否则应设置此选项。这是默认设置。</bullet_item><para/>
        ///       <bullet_item>未选中 - 矢量图形不会被压缩。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Compress Vector Graphics")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _compress_vector_graphics_value _compress_vector_graphics { get; set; } = _compress_vector_graphics_value._true;

        public enum _compress_vector_graphics_value
        {
            /// <summary>
            /// <para>COMPRESS_GRAPHICS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("COMPRESS_GRAPHICS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_COMPRESS_GRAPHICS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_COMPRESS_GRAPHICS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Image Compression</para>
        /// <para><xdoc>
        ///   <para>Specifies the compression scheme used to compress image or raster data in the output PDF file.</para>
        ///   <bulletList>
        ///     <bullet_item>No image compression—Do not compress image or raster data.</bullet_item><para/>
        ///     <bullet_item>Run-length encoded (RLE) compression—Uses Run-length encoded compression.</bullet_item><para/>
        ///     <bullet_item>Deflate compression—Uses Deflate, a lossless data compression.</bullet_item><para/>
        ///     <bullet_item>Lempel-Ziv-Welch (LZW) compression—Uses Lempel-Ziv-Welch, a lossless data compression.</bullet_item><para/>
        ///     <bullet_item>Joint Photographic Experts Group (JPEG) compression—Uses JPEG, a lossy data compression.</bullet_item><para/>
        ///     <bullet_item>Adaptive compression—Uses Adaptive, which automatically selects the best compression type for each image on the page. JPEG will be used for large images with many unique colors. Deflate will be used for all other images. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于压缩输出 PDF 文件中的图像或栅格数据的压缩方案。</para>
        ///   <bulletList>
        ///     <bullet_item>无影像压缩 - 不压缩影像或栅格数据。</bullet_item><para/>
        ///     <bullet_item>游程编码 （RLE） 压缩 - 使用游程编码压缩。</bullet_item><para/>
        ///     <bullet_item>Deflate 压缩 - 使用 Deflate，一种无损数据压缩。</bullet_item><para/>
        ///     <bullet_item>Lempel-Ziv-Welch （LZW） 压缩 - 使用 Lempel-Ziv-Welch，一种无损数据压缩。</bullet_item><para/>
        ///     <bullet_item>联合图像专家组 （JPEG） 压缩 - 使用 JPEG（一种有损数据压缩）。</bullet_item><para/>
        ///     <bullet_item>自适应压缩 （Adaptive compression） - 使用自适应，它会自动为页面上的每个图像选择最佳压缩类型。JPEG 将用于具有许多独特颜色的大图像。Deflate 将用于所有其他图像。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Image Compression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _image_compression_value _image_compression { get; set; } = _image_compression_value._ADAPTIVE;

        public enum _image_compression_value
        {
            /// <summary>
            /// <para>No image compression</para>
            /// <para>No image compression—Do not compress image or raster data.</para>
            /// <para>无影像压缩 - 不压缩影像或栅格数据。</para>
            /// </summary>
            [Description("No image compression")]
            [GPEnumValue("NONE")]
            _NONE,

            /// <summary>
            /// <para>Run-length encoded (RLE) compression</para>
            /// <para>Run-length encoded (RLE) compression—Uses Run-length encoded compression.</para>
            /// <para>游程编码 （RLE） 压缩 - 使用游程编码压缩。</para>
            /// </summary>
            [Description("Run-length encoded (RLE) compression")]
            [GPEnumValue("RLE")]
            _RLE,

            /// <summary>
            /// <para>Deflate compression</para>
            /// <para>Deflate compression—Uses Deflate, a lossless data compression.</para>
            /// <para>Deflate 压缩 - 使用 Deflate，一种无损数据压缩。</para>
            /// </summary>
            [Description("Deflate compression")]
            [GPEnumValue("DEFLATE")]
            _DEFLATE,

            /// <summary>
            /// <para>Lempel-Ziv-Welch (LZW) compression</para>
            /// <para>Lempel-Ziv-Welch (LZW) compression—Uses Lempel-Ziv-Welch, a lossless data compression.</para>
            /// <para>Lempel-Ziv-Welch （LZW） 压缩 - 使用 Lempel-Ziv-Welch，一种无损数据压缩。</para>
            /// </summary>
            [Description("Lempel-Ziv-Welch (LZW) compression")]
            [GPEnumValue("LZW")]
            _LZW,

            /// <summary>
            /// <para>Joint Photographic Experts Group (JPEG) compression</para>
            /// <para>Joint Photographic Experts Group (JPEG) compression—Uses JPEG, a lossy data compression.</para>
            /// <para>联合图像专家组 （JPEG） 压缩 - 使用 JPEG（一种有损数据压缩）。</para>
            /// </summary>
            [Description("Joint Photographic Experts Group (JPEG) compression")]
            [GPEnumValue("JPEG")]
            _JPEG,

            /// <summary>
            /// <para>Adaptive compression</para>
            /// <para>Adaptive compression—Uses Adaptive, which automatically selects the best compression type for each image on the page. JPEG will be used for large images with many unique colors. Deflate will be used for all other images. This is the default.</para>
            /// <para>自适应压缩 （Adaptive compression） - 使用自适应，它会自动为页面上的每个图像选择最佳压缩类型。JPEG 将用于具有许多独特颜色的大图像。Deflate 将用于所有其他图像。这是默认设置。</para>
            /// </summary>
            [Description("Adaptive compression")]
            [GPEnumValue("ADAPTIVE")]
            _ADAPTIVE,

        }

        /// <summary>
        /// <para>Password Protect</para>
        /// <para><xdoc>
        ///   <para>Specifies whether password protection is needed to view the output PDF report.</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>Checked—The output PDF report document will require a password to open.</bullet_item><para/>
        ///       <bullet_item>Unchecked—The output PDF report document can be opened without providing a password. This is the default.</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否需要密码保护才能查看输出的 PDF 报告。</para>
        ///   <para>
        ///     <bulletList>
        ///       <bullet_item>选中 - 输出 PDF 报告文档需要密码才能打开。</bullet_item><para/>
        ///       <bullet_item>未选中 - 无需提供密码即可打开输出 PDF 报告文档。这是默认设置。</bullet_item><para/>
        ///     </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Password Protect")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _password_protect_value _password_protect { get; set; } = _password_protect_value._false;

        public enum _password_protect_value
        {
            /// <summary>
            /// <para>PASSWORD_PROTECT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PASSWORD_PROTECT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_PASSWORD_PROTECT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_PASSWORD_PROTECT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>PDF Password</para>
        /// <para>A password to restrict opening the PDF.</para>
        /// <para>用于限制打开 PDF 的密码。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("PDF Password")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _pdf_password { get; set; } = null;


        /// <summary>
        /// <para>Page Range Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the page range of the report to export.</para>
        ///   <bulletList>
        ///     <bullet_item>All pages—Export all pages. This is the default.</bullet_item><para/>
        ///     <bullet_item>Last page—Export the last page only.</bullet_item><para/>
        ///     <bullet_item>Odd numbered pages—Export the odd numbered pages.</bullet_item><para/>
        ///     <bullet_item>Even numbered pages—Export the even numbered pages.</bullet_item><para/>
        ///     <bullet_item>Custom page range—Export a custom page range.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要导出的报表的页面范围。</para>
        ///   <bulletList>
        ///     <bullet_item>所有页面 - 导出所有页面。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>最后一页 - 仅导出最后一页。</bullet_item><para/>
        ///     <bullet_item>奇数页 - 导出奇数页。</bullet_item><para/>
        ///     <bullet_item>偶数页 - 输出偶数页。</bullet_item><para/>
        ///     <bullet_item>自定义页面范围 - 导出自定义页面范围。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Page Range Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _page_range_type_value _page_range_type { get; set; } = _page_range_type_value._ALL;

        public enum _page_range_type_value
        {
            /// <summary>
            /// <para>All pages</para>
            /// <para>All pages—Export all pages. This is the default.</para>
            /// <para>所有页面 - 导出所有页面。这是默认设置。</para>
            /// </summary>
            [Description("All pages")]
            [GPEnumValue("ALL")]
            _ALL,

            /// <summary>
            /// <para>Last page</para>
            /// <para>Last page—Export the last page only.</para>
            /// <para>最后一页 - 仅导出最后一页。</para>
            /// </summary>
            [Description("Last page")]
            [GPEnumValue("LAST")]
            _LAST,

            /// <summary>
            /// <para>Odd numbered pages</para>
            /// <para>Odd numbered pages—Export the odd numbered pages.</para>
            /// <para>奇数页 - 导出奇数页。</para>
            /// </summary>
            [Description("Odd numbered pages")]
            [GPEnumValue("ODD")]
            _ODD,

            /// <summary>
            /// <para>Even numbered pages</para>
            /// <para>Even numbered pages—Export the even numbered pages.</para>
            /// <para>偶数页 - 输出偶数页。</para>
            /// </summary>
            [Description("Even numbered pages")]
            [GPEnumValue("EVEN")]
            _EVEN,

            /// <summary>
            /// <para>Custom page range</para>
            /// <para>Custom page range—Export a custom page range.</para>
            /// <para>自定义页面范围 - 导出自定义页面范围。</para>
            /// </summary>
            [Description("Custom page range")]
            [GPEnumValue("CUSTOM")]
            _CUSTOM,

        }

        /// <summary>
        /// <para>Custom Page Range</para>
        /// <para>The pages to be exported when the Page Range Type parameter is set to Custom. You can set individual pages, ranges, or a combination of both separated by commas, such as 1, 3-5, 10.</para>
        /// <para>当页面范围类型参数设置为自定义时要导出的页面。您可以设置单个页面、范围或两者的组合，用逗号分隔，例如 1、3-5、10。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Custom Page Range")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _custom_page_range { get; set; } = null;


        /// <summary>
        /// <para>Initial Page Number</para>
        /// <para>The initial page number of the report to create a page numbering offset to add additional pages to the beginning of the report.</para>
        /// <para>报表的初始页码，用于创建页码偏移量，以便将其他页添加到报表的开头。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Initial Page Number")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _initial_page_number { get; set; } = null;


        /// <summary>
        /// <para>Final Page Number</para>
        /// <para>The page number to display on the last page of the exported PDF.</para>
        /// <para>要在导出的 PDF 的最后一页上显示的页码。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Final Page Number")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _final_page_number { get; set; } = null;


        public ExportReportToPDF SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}